ind_shnormMPEC <- function(expmeanval,expmu, oo, sharesum, marketForProducts) {

#numer<-(expmeanval%*%oo)*expmu         # this is the numerator (oo speeds-up expanding mean utility by number of draws)
#sum1<-sharesum%*%numer
List<-ind(expmeanval, expmu, oo, sharesum)
#sum11<-1/(1+sumnumer[1])
#sum11<-1/(1+sum1)                        # this is the denominator of the shares
#sum11<-as.matrix(sum11)
denom1<-List$sum11[marketForProducts,]       # this expands the denominator
simShare<-(List$numer)*denom1                  # simulated shares for each draw
EstShare<-rowMeans(simShare) 		
EstShare<-as.matrix(EstShare)
simEstShare<-cbind(simShare,EstShare)
  
return(simEstShare)  

}
